package com.ServiceImpl.rocket;

import com.Service.rocket.FeePlatMqService;
import com.Service.rocket.ParamConfigService;
import com.alibaba.rocketmq.client.producer.DefaultMQProducer;
import com.alibaba.rocketmq.client.producer.SendResult;
import com.alibaba.rocketmq.common.message.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Description:
 * @Author: suzr
 * @Date: 2019-6-10 15:12
 * @return:
 * @throws:
 */
@Service
public class FeePlatMqServiceImpl implements FeePlatMqService {
   /* @Autowired
    private DefaultMQProducer defaultMQProducer;
    @Resource
    private ParamConfigService paramConfigService;

    @Override
    public SendResult openAccountMsg(String msgInfo) {
        defaultMQProducer.setProducerGroup(paramConfigService.feePlatGroup);
        SendResult sendResult = null;
        try {

                Message sendMsg = new Message(paramConfigService.feePlatTopic, paramConfigService.feeAccountTag,
                        "fee_open_account_key", msgInfo.getBytes());
                sendResult = defaultMQProducer.send(sendMsg);

        } catch (Exception e) {
            e.printStackTrace();
        }
        return sendResult;
    }*/
}
